package com.cloudkinto.service.warehouse;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cloudkinto.bo.warehouse.WarehouseAddBo;
import com.cloudkinto.bo.warehouse.WarehouseQueryBo;
import com.cloudkinto.bo.warehouse.WarehouseUpdateBo;
import com.cloudkinto.common.web.PageResult;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.entity.WarehouseDo;
import com.cloudkinto.vo.warehouse.ChannelWarehouseVo;
import com.cloudkinto.vo.warehouse.CompanyWarehouseVo;
import com.cloudkinto.vo.warehouse.WarehouseRes;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 仓库表 service接口
 * </p>
 *
 * @author long
 * @since 2024-10-29
 */
public interface WarehouseService extends IService<WarehouseDo> {

    void add(WarehouseAddBo bo);

    void update(WarehouseUpdateBo updateVo);

    int delete(Long id, Long userId);

    Object detail(Long id);

    SingleResult<Map<String, Object>> pageInit(Long tenantId);

    Long getLastWhId(String source, Long userId, Long tenantId);

    List<WarehouseRes> getList(Long tenantId);

    List<WarehouseRes> getList(String source, Long userId, Long tenantId);

    List<WarehouseRes> getList(WarehouseQueryBo bo);

    PageResult getListPage(WarehouseQueryBo bo);

    List<ChannelWarehouseVo> getWarehouseListForChannel(Long channelId, Long tenantId);

    List<CompanyWarehouseVo> getWarehouseCompanyForAddInit(Long companyId, Long tenantId);

    List<CompanyWarehouseVo> getWarehouseCompany(Long companyId, Long tenantId);

    List<WarehouseDo> getWarehouseCompanyDo(Long companyId, Long tenantId);

    List<CompanyWarehouseVo> getWarehouseListForBindAddress(Long channelId, Long tenantId);
}
